package com.nageoffer.subject.common.enums;

import lombok.Getter;

/**
 * 删除枚举类
 */
@Getter
public enum IsDeletedFlagEnums {
    DELETED(1, "已删除"),
    UN_DELETED(0, "未删除");
    public int code;
    public String desc;

    IsDeletedFlagEnums(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static ResultCodeEnums getEnumByCode(int codeVal) {
        for (ResultCodeEnums resultCodeEums : ResultCodeEnums.values()) {
            if (resultCodeEums.code == codeVal) {
                return resultCodeEums;
            }
        }
        return null;
    }
}
